﻿namespace WeWork.Model
{
    /// <summary>
    /// 表情
    /// </summary>
    public class ChatEmotion : MsgChatRoomBase
    {
        /*
        {
            "msgid":"6623217619416669654_1603875612",
            "action":"send",
            "from":"icef",
            "tolist":["wmErxtDgAAhteCglUZH2kUt3rq431qmg"],
            "roomid":"",
            "msgtime":1603875611148,
            "msgtype":"emotion",
            "emotion":{
                "type":1,
                "width":290,
                "height":290,
                "imagesize":962604,
                "md5sum":"94c2b0bba52cc456cb8221b248096612",
                "sdkfileid":"4eE1ESTVNalE1TnprMFh6RTJNRE00TnpVMk1UST0aIDc0NzI2NjY1NzE3NTc0Nzg2ZDZlNzg2YTY5NjY2MTYx"
            }
        }
        */
        /// <summary>
        /// 消息内容
        /// </summary>
        public EmotionInfo emotion { set; get; }
    }

    public class EmotionInfo
    {
        /// <summary>
        /// 表情类型，png或者gif.1表示gif 2表示png。Uint32类型
        /// </summary>
        public int type { set; get; }
        /// <summary>
        /// 表情图片宽度。Uint32类型
        /// </summary>
        public int width { set; get; }
        /// <summary>
        /// 表情图片高度。Uint32类型
        /// </summary>
        public int height { set; get; }
        /// <summary>
        /// 资源的文件大小。Uint32类型
        /// </summary>
        public int imagesize { set; get; }
        /// <summary>
        /// 资源的md5值，供进行校验。String类型
        /// </summary>
        public string md5sum { set; get; }
        /// <summary>
        /// 媒体资源的id信息。String类型
        /// </summary>
        public string sdkfileid { set; get; }
    }
}
